﻿using System;
using System.Collections.Generic;
using Zjh.PackSerializer.Attributes;

namespace Zjh.PackSerializer.Demo
{
    [PackContract]
    internal class Model
    {
        [PackMember(1)]
        public int Id { get; set; }

        [PackMember(2)]
        public string Name { get; set; }

        [PackMember(3)]
        public DateTime CreateTime { get; set; }

        [PackMember(4)]
        public bool IsUsed { get; set; }

        [PackMember(5)]
        public string Server { get; set; }

        [PackMember(6)]
        public ushort ServerPort { get; set; }

        [PackMember(7)]
        public Address Address { get; set; }

        [PackMember(8)]
        public List<int> Files { get; set; }

        [PackMember(9)]
        public int[] FileArray { get; set; }
    }

    [PackContract]
    internal class Address
    {
        [PackMember(1)]
        public int Id { get; set; }

        [PackMember(2)]
        public string Line1 { get; set; }

        [PackMember(3)]
        public string Line2 { get; set; }
    }
}